package org.big.usermanager.service;

import org.big.usermanager.UserController;
import org.big.usermanager.dto.*;
import org.big.usermanager.mapper.UserMapper;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;


@Service
public class UserServiceImpl implements UserService {
    private static final Logger log = LoggerFactory.getLogger(UserController.class);

    @Autowired
    UserMapper userMapper;

    @Override
    public UserResponse createUser(CreateUserRequest request) {
        int insert = userMapper.insert(request);
        log.info("Inserted user: " + insert);

        return null;
    }

    @Override
    public UserResponse getUserById(Long userId) {
        return userMapper.getUserById(userId);
    }

    @Override
    public UserResponse updateUser(Long userId, UpdateUserRequest request) {
        int update = userMapper.update(userId, request);
        return null;
    }

    @Override
    public void deleteUser(Long userId) {

    }

    @Override
    public void updateUserStatus(Long userId, UpdateStatusRequest request) {

    }

    @Override
    public void changePassword(Long userId, ChangePasswordRequest request) {

    }

    @Override
    public UserResponse getUserByPhone(String phone) {
        return null;
    }

    @Override
    public UserResponse getUserByEmail(String email) {
        return null;
    }

    @Override
    public List<UserResponse> getUsersBatch(List<Long> userIds) {
        return List.of();
    }
}
